namespace ScrumSprintMonitor.Wpf.Application
{
	#region #using Directives

	using System;

	using Infrastructure.Configuration;

	using UI.Wpf;

	#endregion

	public class OutlookFreeBusyInfoConfiguration : IFreeBusyInfoConfiguration
	{
		#region IFreeBusyInfoConfiguration Members

		public bool IsConsideredFreeTime(FreeBusyTime state)
		{
			switch (state)
			{
				case FreeBusyTime.Free:
					return true;
				case FreeBusyTime.Tentative:
					return Settings.Default.ConsiderOutlookTentativeAsFreeTime;
				case FreeBusyTime.Busy:
				case FreeBusyTime.OutOfOffice:
					return false;
				default:
					throw new ArgumentOutOfRangeException("state");
			}
		}

		#endregion
	}
}